import * as types from './mutation_types'
import request from '../../../util/axios'

// 获取档号生成规则
export const getDh = ({ commit }, idCategory) => {
  commit(types.DH_SET_RETRIEVED, null)
  return request({
    url: `/yuyi-config-boot/api/config/archiveNoFmt/idCategory/${idCategory}`
  }).then((res) => {
    commit(types.DH_SET_RETRIEVED, res.data.data)
  }).catch(() => {
    commit(types.DH_SET_RETRIEVED, null)
  })
}
